<template>
    <Header />
    <!-- 手机端 -->
    <div class="myOrderBody hidden-sm-and-up">
        <div class="order-contaienr-phone">
            <div class="order-item-container">
                <div class="order-item-box">
                    <div class="order-item">
                        <div class="order-item-title" style="color: #356CEB;font-weight: 600;font-size: 18px;">深圳海棠湾君悦酒店
                        </div>
                        <div class="order-item-cancel" style="color: #356CEB;font-weight: 600;font-size: 18px;">
                            2间
                        </div>
                    </div>
                    <div class="cutline" style="margin-top: 10px;margin-bottom: 10px;"></div>
                    <div class="order-item">
                        <div class="order-item-title">订单号：HZDD10113465GD245</div>
                    </div>
                    <div class="order-item">
                        <div class="order-item-title">下单时间：2024-1-18 20:18:02</div>
                    </div>
                    <div class="order-item">
                        <div class="order-item-title">2024 年广州会展业创新发展峰会</div>
                    </div>
                    <div class="order-item">
                        <div class="order-item-title" style="display: flex;align-items: center;gap: 10px;"><svg
                                t="1711967334371" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                xmlns="http://www.w3.org/2000/svg" p-id="5203" width="15" height="15">
                                <path
                                    d="M465.622 0.96V465.62H0.96V0.96h464.664z m0 557.418V1023.04H0.96V558.378h464.664zM93.712 372.486h278.774V93.712H93.712v278.774z m0 557.036h278.774V651.514H93.712v278.008z m185.892-742.672v92.88H186.85v-92.88h92.754z m0 557.546v92.882H186.85V744.4h92.754zM1023.04 0.96v464.664H558.378V0.96H1023.04z m0 557.42v278.772H744.268v-92.88h-92.88V1023.04h-92.884V558.378h278.9v92.88h92.884v-92.88h92.754z m-371.528-185.892h278.774V93.712H651.514v278.774z m185.636-185.636v92.88h-92.88v-92.88h92.88z m0 743.438v92.754h-92.88V930.16l92.88 0.128z m185.892 0v92.754H930.16V930.16l92.88 0.128z"
                                    fill="#515151" p-id="5204"></path>
                            </svg>订单二维码</div>

                    </div>
                    <div class="order-item">
                        <div class="order-item-title">总价：¥2073.00</div>
                    </div>

                    <div class="cutline"></div>
                    <div class="flex-between">
                        <div class="price">
                            支付方式：微信支付
                        </div>
                        <div class="keyword-content" style="color: #4BAE50;font-weight: 700;font-size: 18px">待入住</div>
                    </div>
                    <!-- <div class="price">
                        总计￥2073.00
                    </div> -->

                </div>
                <div class="order-item-box" v-for="(item,index) in 2" :key="index">
                    <div class="order-item">
                        <div class="order-item-title" style="color: #356CEB;font-weight: 600;font-size: 18px;">房间{{
                            index + 1 }}</div>

                    </div>
                    <div class="cutline" style="margin-top: 10px;margin-bottom: 10px;"></div>
                    <div class="room-info flex-between mb10">
                        <div>
                            <img src="../static/dh.jpg" class="imgSize100" alt="">
                        </div>
                        <div>
                            <div class="room-name bold fz16">儒雅大床房/含早餐</div>
                            <div class="room-name color817">双床 含早餐 免费上网 无班车</div>
                            <div>
                                <div>3月8日 周五 —— 3月11日 周一</div>
                                <div>共 3 晚</div>
                            </div>
                            <div>
                                到店时间3月8日 14：00
                            </div>
                        </div>
                    </div>
                    <div class="room-person flex-between pd20">
                        <div>
                            <div>
                                姓名：王五
                            </div>
                            <div>
                                姓名：王五
                            </div>
                        </div>
                        <div>
                            <div>
                                电话：18878787878
                            </div>
                            <div>
                                电话：18878787878
                            </div>
                        </div>
                    </div>

                    <div class="cutline" style="margin-top: 10px;margin-bottom: 10px;"></div>
                    <div class="flex-between">
                        <div class="price" @click="changeRoomInfo = true">
                            <el-button type="primary" size="small" class="color365">变更</el-button>
                        </div>
                        <div class="keyword-content" style="color: #4BAE50;font-weight: 700;font-size: 18px">待入住</div>
                    </div>
                    <!-- <div class="price">
                        总计￥2073.00
                    </div> -->

                </div>
                <div class="order-item-box">
                    <div class="order-item">
                        <div class="order-item-title" style="color: #356CEB;font-weight: 600;font-size: 18px;">订单信息
                        </div>

                    </div>
                    <div class="cutline" style="margin-top: 10px;margin-bottom: 10px;"></div>

                    <div class="contactPerson plr20">
                        <div class="flex-between mb20">
                            <div>单位</div>
                            <div>北京子杰跳动科技</div>
                        </div>
                        <div class="flex-between mb20">
                            <div>邮箱</div>
                            <div>bjzjtb.wxs@163.com</div>
                        </div>
                        <div class="flex-between mb20">
                            <div>联系人</div>
                            <div>吴星士</div>
                        </div>
                        <div class="flex-between mb20">
                            <div>联系人手机号</div>
                            <div>18878787878</div>
                        </div>
                    </div>
                    <div class="cutline" style="margin-top: 10px;margin-bottom: 10px;"></div>
                    <div class="flex-between">
                        <div class="price" @click="changeContactInfo = true">
                            <el-button type="primary" size="small" class="color365">变更</el-button>
                        </div>
                    </div>
                    <!-- <div class="price">
                        总计￥2073.00
                    </div> -->

                </div>

            </div>
        </div>
    </div>

    <!-- 变更房间的对话框 -->
    <el-dialog v-model="changeRoomInfo" title="变更房间信息" width="80%" :before-close="handleClose">
        <div class="bold">选择入住时间</div>
        <div class="dateChange bgColF9 bdr5 pd10 mt10 flex-around">
            <span>03月08日<el-icon><ArrowRight /></el-icon></span> 至 <span>03月11日<el-icon><ArrowRight /></el-icon></span>
        </div>
        <div class="mb10 mt10 bold">入住人信息</div>
        <div class="bgColF9 bdr5 pd10 mb10">
            <div class="flex-between bdD8 pd10">
                <div>入住人名称</div>
                <div>王五</div>
            </div>
            <div class="flex-between bdD8 pd10">
                <div>入住人电话</div>
                <div>18888888888</div>
            </div>
        </div>
        <div class="bgColF9 bdr5 pd10">
            <div class="flex-between bdD8 pd10">
                <div>入住人名称</div>
                <div>王五</div>
            </div>
            <div class="flex-between bdD8 pd10">
                <div>入住人电话</div>
                <div>18888888888</div>
            </div>
        </div>
        <template #footer>
            <div class="dialog-footer">
                <el-button @click="dialogVisible = false">取消房间</el-button>
                <el-button type="primary" @click="dialogVisible = false">
                    变更
                </el-button>
            </div>
        </template>
    </el-dialog>
    <!-- 变更订单信息的对话框 -->
    <el-dialog v-model="changeContactInfo" title="变更订单信息" width="80%" :before-close="handleClose">
        <div class="bgColF9 bdr5 pd10 mb10">
            <div class="flex-between bdD8 pd10">
                <div class="color000 bold">单位</div>
                <div>王五</div>
            </div>
            <div class="flex-between bdD8 pd10">
                <div class="color000 bold">邮箱</div>
                <div>18888888888</div>
            </div>
            <div class="flex-between bdD8 pd10">
                <div class="color000 bold">联系人</div>
                <div>王五</div>
            </div>
            <div class="flex-between bdD8 pd10">
                <div class="color000 bold">联系人手机号</div>
                <div>18888888888</div>
            </div>
        </div>
    </el-dialog>
</template>
<script lang="ts" setup>
    import Header from '@/components/Header.vue'
    import { ref } from 'vue'
    import type { TabsPaneContext } from 'element-plus'
    import { ElMessageBox } from 'element-plus'

    const activeName = ref('first')

    const handleClick = (tab: TabsPaneContext, event: Event) => {
        console.log(tab, event)
    }
    const changeRoomInfo = ref(false)
    const changeContactInfo = ref(false)

    const handleClose = (done: () => void) => {
        done()
    }
</script>
<style lang="scss">
    @import '@/assets/variables.scss';

    .flex-between {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .myOrderBody {
        max-width: $border-primary-max-width;
        margin: 0 auto;
        margin-bottom: 30px;

        .previewByDate {
            display: flex;
            height: 50px;
            color: #fff;
            background-color: #356CEB;
            padding: 0 20px;
            margin-top: 30px;
            align-items: center;

            justify-content: space-between;

            .title {
                display: flex;
                gap: 10px;
                align-items: center;
            }
        }

        .order-contaienr-phone {
            .el-tabs__item {
                padding: 0 15px !important;
            }

            .el-tabs__header {
                margin: 0;
            }

            .el-tabs__item {
                height: 60px;
            }

            .el-tabs__nav-scroll {
                height: 60px;
                line-height: 60px;
            }

            .order-item-container {

                background-color: #F4F4F4;
                padding: 15px;
                font-size: 14px;

                .cutline {
                    border-bottom: 1px dashed #ccc;
                    margin: 20px 0;

                }

                .order-item-box {
                    background-color: #fff;
                    padding: 10px 15px;
                    border-radius: 10px;
                    margin-bottom: 10px;

                }

                .order-item {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    margin-bottom: 5px;

                    .order-item-title {}

                    .order-item-date {
                        width: 350px;


                    }

                    .order-item-night {
                        width: 280px;


                    }

                    .order-item-cancel {

                        cursor: pointer;
                        color: #ccc;
                    }
                }



                .order-keyword {
                    display: flex;
                    justify-content: space-between;
                    width: 100%;

                    margin-top: 5px;
                    color: #929292;

                    .keyword-title {
                        margin-bottom: 5px;
                    }

                    .keyword-content {
                        color: #3d3d3d;
                        font-size: 14px;
                    }
                }

                .price {

                    font-size: 12px;
                    display: flex;
                    justify-content: flex-end;
                }
            }
        }
    }
</style>